<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>统计分析 - 习惯掌控</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        }

        body {
            background-color: #f6f8fa;
            color: #333;
        }

        .container {
            max-width: 414px;
            margin: 0 auto;
            background-color: white;
            min-height: 100vh;
            position: relative;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .header {
            padding: 50px 20px 20px;
            background-color: #4CAF50;
            color: white;
        }

        .title {
            font-size: 24px;
            font-weight: bold;
        }

        .tabs {
            display: flex;
            padding: 0 15px;
            background-color: white;
            border-bottom: 1px solid #eee;
        }

        .tab {
            padding: 15px;
            color: #666;
            font-weight: 500;
            position: relative;
            cursor: pointer;
        }

        .tab.active {
            color: #4CAF50;
        }

        .tab.active:after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background-color: #4CAF50;
            border-radius: 3px 3px 0 0;
        }

        .stats-container {
            padding: 20px;
        }

        .stats-summary {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 20px;
        }

        .stats-card {
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            text-align: center;
        }

        .stats-value {
            font-size: 28px;
            font-weight: bold;
            color: #4CAF50;
            margin: 10px 0;
        }

        .stats-label {
            font-size: 14px;
            color: #666;
        }

        .stats-icon {
            font-size: 20px;
            color: #4CAF50;
            opacity: 0.8;
        }

        .chart-container {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            margin-bottom: 20px;
        }

        .chart-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chart-subtitle {
            font-size: 13px;
            color: #666;
            font-weight: normal;
        }

        .chart {
            height: 200px;
            display: flex;
            align-items: flex-end;
            gap: 10px;
            padding-top: 20px;
        }

        .bar {
            flex: 1;
            background-color: #e8f5e9;
            position: relative;
            border-radius: 4px 4px 0 0;
        }

        .bar-fill {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #4CAF50;
            border-radius: 4px 4px 0 0;
        }

        .bar-label {
            position: absolute;
            bottom: -25px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 12px;
            color: #666;
        }

        .best-streak {
            display: flex;
            align-items: center;
            gap: 15px;
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            margin-bottom: 20px;
        }

        .streak-icon {
            width: 50px;
            height: 50px;
            background-color: #FFF9C4;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: #FFA000;
        }

        .streak-info {
            flex: 1;
        }

        .streak-title {
            font-weight: bold;
            font-size: 16px;
            margin-bottom: 5px;
        }

        .streak-desc {
            font-size: 13px;
            color: #666;
        }

        .streak-value {
            font-size: 24px;
            font-weight: bold;
            color: #FFA000;
        }

        .habit-performance {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }

        .performance-list {
            margin-top: 15px;
        }

        .performance-item {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #eee;
        }

        .performance-item:last-child {
            border-bottom: none;
        }

        .performance-icon {
            width: 40px;
            height: 40px;
            background-color: #e3f2fd;
            color: #4CAF50;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            margin-right: 15px;
        }

        .performance-info {
            flex: 1;
        }

        .performance-title {
            font-weight: bold;
            margin-bottom: 3px;
        }

        .performance-rate {
            font-size: 13px;
            color: #666;
        }

        .performance-percent {
            font-weight: bold;
            font-size: 16px;
            color: #4CAF50;
        }

        .calendar {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 5px;
            margin-top: 15px;
        }

        .calendar-header {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            margin-bottom: 5px;
        }

        .calendar-day {
            text-align: center;
            font-size: 12px;
            color: #999;
        }

        .calendar-cell {
            aspect-ratio: 1;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            background-color: #f5f5f5;
            color: #999;
        }

        .calendar-cell.completed {
            background-color: #4CAF50;
            color: white;
        }

        .calendar-cell.partial {
            background-color: #8BC34A;
            color: white;
        }

        .calendar-cell.missed {
            background-color: #FFCDD2;
            color: #D32F2F;
        }

        .navigation {
            position: fixed;
            bottom: 0;
            width: 100%;
            max-width: 414px;
            background-color: white;
            display: flex;
            justify-content: space-around;
            padding: 15px 0;
            border-top: 1px solid #e0e0e0;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            font-size: 12px;
            color: #888;
        }

        .nav-item.active {
            color: #4CAF50;
        }

        .nav-icon {
            font-size: 20px;
            margin-bottom: 5px;
        }

        .empty-space {
            height: 80px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="header">
            <div class="title">统计分析</div>
        </div>

        <div class="tabs">
            <div class="tab active">总览</div>
            <div class="tab">周</div>
            <div class="tab">月</div>
            <div class="tab">年</div>
        </div>

        <div class="stats-container">
            <div class="stats-summary">
                <div class="stats-card">
                    <div class="stats-icon"><i class="fas fa-check-circle"></i></div>
                    <div class="stats-value">85%</div>
                    <div class="stats-label">习惯完成率</div>
                </div>
                <div class="stats-card">
                    <div class="stats-icon"><i class="fas fa-calendar-check"></i></div>
                    <div class="stats-value">31</div>
                    <div class="stats-label">最长连续天数</div>
                </div>
                <div class="stats-card">
                    <div class="stats-icon"><i class="fas fa-trophy"></i></div>
                    <div class="stats-value">15</div>
                    <div class="stats-label">当前连续天数</div>
                </div>
                <div class="stats-card">
                    <div class="stats-icon"><i class="fas fa-tasks"></i></div>
                    <div class="stats-value">132</div>
                    <div class="stats-label">总打卡次数</div>
                </div>
            </div>

            <div class="chart-container">
                <div class="chart-title">
                    最近完成情况
                    <span class="chart-subtitle">最近7天</span>
                </div>
                <div class="chart">
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 80%"></div>
                        <div class="bar-label">一</div>
                    </div>
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 100%"></div>
                        <div class="bar-label">二</div>
                    </div>
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 60%"></div>
                        <div class="bar-label">三</div>
                    </div>
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 90%"></div>
                        <div class="bar-label">四</div>
                    </div>
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 100%"></div>
                        <div class="bar-label">五</div>
                    </div>
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 70%"></div>
                        <div class="bar-label">六</div>
                    </div>
                    <div class="bar" style="height: 100%">
                        <div class="bar-fill" style="height: 50%"></div>
                        <div class="bar-label">日</div>
                    </div>
                </div>
            </div>

            <div class="best-streak">
                <div class="streak-icon">
                    <i class="fas fa-fire"></i>
                </div>
                <div class="streak-info">
                    <div class="streak-title">晨跑5公里</div>
                    <div class="streak-desc">你的最佳习惯</div>
                </div>
                <div class="streak-value">31</div>
            </div>

            <div class="habit-performance">
                <div class="chart-title">
                    习惯完成情况
                </div>
                <div class="performance-list">
                    <div class="performance-item">
                        <div class="performance-icon">
                            <i class="fas fa-running"></i>
                        </div>
                        <div class="performance-info">
                            <div class="performance-title">晨跑5公里</div>
                            <div class="performance-rate">31/31 天</div>
                        </div>
                        <div class="performance-percent">100%</div>
                    </div>
                    <div class="performance-item">
                        <div class="performance-icon">
                            <i class="fas fa-book"></i>
                        </div>
                        <div class="performance-info">
                            <div class="performance-title">阅读30分钟</div>
                            <div class="performance-rate">25/31 天</div>
                        </div>
                        <div class="performance-percent">80%</div>
                    </div>
                    <div class="performance-item">
                        <div class="performance-icon">
                            <i class="fas fa-water"></i>
                        </div>
                        <div class="performance-info">
                            <div class="performance-title">喝水2000ml</div>
                            <div class="performance-rate">28/31 天</div>
                        </div>
                        <div class="performance-percent">90%</div>
                    </div>
                    <div class="performance-item">
                        <div class="performance-icon">
                            <i class="fas fa-moon"></i>
                        </div>
                        <div class="performance-info">
                            <div class="performance-title">22:30前睡觉</div>
                            <div class="performance-rate">22/31 天</div>
                        </div>
                        <div class="performance-percent">71%</div>
                    </div>
                </div>
            </div>

            <div class="empty-space"></div>
        </div>

        <div class="navigation">
            <div class="nav-item">
                <div class="nav-icon"><i class="fas fa-home"></i></div>
                <div>首页</div>
            </div>
            <div class="nav-item">
                <div class="nav-icon"><i class="fas fa-list-check"></i></div>
                <div>习惯</div>
            </div>
            <div class="nav-item active">
                <div class="nav-icon"><i class="fas fa-chart-line"></i></div>
                <div>统计</div>
            </div>
            <div class="nav-item">
                <div class="nav-icon"><i class="fas fa-users"></i></div>
                <div>社区</div>
            </div>
            <div class="nav-item">
                <div class="nav-icon"><i class="fas fa-user"></i></div>
                <div>我的</div>
            </div>
        </div>
    </div>
</body>

</html>